﻿Public Class RawView
    Inherits KeyedWindowBase

    Public Sub New(obj As RawObject, owner As Window)
        MyBase.New()

        InitializeComponent()
        Me.Owner = owner
        Me.DataContext = New RawViewVm(obj)
    End Sub

    Protected Overrides Sub HandleMessage(sender As KeyedViewModelBase, message As MessageBase)
        MyBase.HandleMessage(sender, message)

        Select Case message.GetType
            Case GetType(Messages.RawView.Close)
                Me.Close()
        End Select
    End Sub

    Protected Overrides Function GetHandledMessageTypes() As List(Of Type)
        Return New List(Of Type)({GetType(Messages.RawView.Close)})
    End Function
End Class
